/**
 * <p>
 * Controller 类
 * </p>
 *
 * @author zhangzhenfu
 * @since 2022-05-27
 */
package com.projects.api.common.base;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class BaseForm {

    @ApiModelProperty(value = "当前操作人ID",hidden = true)
    protected Integer operatorId;

    @ApiModelProperty(value = "当前操作人名称",hidden = true)
    protected String operatorName;

    @ApiModelProperty(value = "当前入驻商",hidden = true)
    protected Integer merchantId;


    public <T extends BaseUserInfo> void build(T userInfo){
        this.operatorId = userInfo.getId();
        this.operatorName = userInfo.getName();
        this.merchantId = userInfo.getMerchantId();
    }

}
